<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 15-1-13
 * Time: 下午5:38
 */
namespace Admin\Model;
use Think\Model\RelationModel;


class CharstateModel extends RelationModel {
    //关联表
    protected $tableName = 'char_state';
    protected $_link = array(
        'char' => array(
            'mapping_type'   => self::HAS_ONE,
            'foreign_key'    => 'id',
            'class_name'     => 'char',
            'mapping_key'    => 'char_id',
            'mapping_name'  => 'charinfo'
        ),
        'plant' => array(
            'mapping_type'   => self::HAS_ONE,
            'foreign_key'    => 'id',
            'class_name'     => 'plant',
            'mapping_key'    => 'ev_plant_id',
            'mapping_name'  => 'plantinfo'
        ),
        'member' => array(
            'mapping_type'   => self::HAS_ONE,
            'foreign_key'    => 'id',
            'class_name'     => 'member',
            'mapping_key'    => 'memberID',
            'mapping_name'  => 'memberinfo'
        ),
    );
}